package com.iplant.mes.service.mesenum.sfc;

/**
 * 工件导出记录状态
 */
public enum SFCWorkpieceExportRecordStatus {
    /**
     * 默认
     */
    Default(0, "默认"),
    /**
     * 待导出
     */
    ToHand(1, "待导出"),
    /**
     * 导出中
     */
    Exporting(2, "导出中"),
    /**
     * 已完成
     */
    Finished(3, "已完成");

    private int value;
    private String label;

    SFCWorkpieceExportRecordStatus(int value, String label) {
        this.value = value;
        this.label = label;
    }

    /**
     * 通过 value 的数值获取枚举实例
     */
    public static SFCWorkpieceExportRecordStatus getEnumType(int val) {
        for (SFCWorkpieceExportRecordStatus type : SFCWorkpieceExportRecordStatus.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return Default;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }
}
